<?php

class Scripts_SubscriberViewScript  {
	
	public static function generateListView ($subscribers, $html)  {
		
		new Content($html, array(PropertySetter::PROPERTY_ELEMENT => array(Content::CONTENT => '###ERROR_MSG###')));
		
		$form = new HTML_Form($html, array(PropertySetter::PROPERTY_ATTRIBUTE => array(	HTML_FORM::ATTRIBUTE_ID => 'subscriberListView',
																						HTML_Form::ATTRIBUTE_ACTION => MainController::getRequestUri(),
																					   	HTML_Form::ATTRIBUTE_METHOD => HTML_Form::METHOD_POST)));
		
		new HTML_FormElements_Input($form, array(PropertySetter::PROPERTY_ATTRIBUTE => array(	HTML_FormElements_Input::ATTRIBUTE_TYPE => HTML_FormElements_Input::TYPE_HIDDEN,
																								HTML_FormElements_Input::ATTRIBUTE_NAME => 'subscriberData',
																								HTML_FormElements_Input::ATTRIBUTE_VALUE => 'null',
																								HTML_FormElements_Input::ATTRIBUTE_ID => 'subscriberData')));
		
		new HTML_FormElements_Input($form, array(PropertySetter::PROPERTY_ATTRIBUTE => array(	HTML_FormElements_Input::ATTRIBUTE_TYPE => HTML_FormElements_Input::TYPE_HIDDEN,
																								HTML_FormElements_Input::ATTRIBUTE_NAME => 'subscriberAction',
																								HTML_FormElements_Input::ATTRIBUTE_VALUE => 'null',
																								HTML_FormElements_Input::ATTRIBUTE_ID => 'subscriberAction')));
		
		new HTML_Div($html, array(PropertySetter::PROPERTY_ATTRIBUTE => array(HTML::ATTRIBUTE_ID => 'subscriberListViewInternals')));
		new HTML_Div($html, array(PropertySetter::PROPERTY_ATTRIBUTE => array(HTML::ATTRIBUTE_ID => 'subscriberListViewExternals')));
		
		return $html;
	}
	
}